package com.qingxin.park.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 产地环境表
 */
@Entity
@Table(name = "provenance")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Provenance extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {
	
	private static final long serialVersionUID = -850056505851409726L;
	
	private String proid;
	private String proName;
	private String parkid;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date subtime;
	private String remark;
	private String subName;
	private String subAttach;
	//private Set<ProductionLink> productionLinks = new HashSet<>(0);

	// Constructors

	/** default constructor */
	public Provenance() {
	}
	
	
	public Provenance(String proid) {
		this.proid = proid;
	}


	public Provenance(String proid, String proName) {
		this.proid = proid;
		this.proName = proName;
	}
     
	public Provenance( String proid, String proName,
			Date subtime, String subName) {
		this.proid=proid;
		this.proName = proName;
		this.subtime = subtime;
		this.subName = subName;
		
	}
	
	/** full constructor */
	public Provenance( String proName, String remark, String subName,
			Date subtime, String subAttach) {
		this.proName = proName;
		this.remark = remark;
		this.remark = remark;
		this.subAttach = subAttach;
		this.subtime = subtime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "proid", unique = true, nullable = false, length = 32)
	public String getProid() {
		return this.proid;
	}

	public void setProid(String proid) {
		this.proid = proid;
	}
	@Column(name = "parkid", nullable = false, length = 32)
	public String getParkid() {
		return this.parkid;
	}

	public void setParkid(String parkid) {
		this.parkid = parkid;
	}
	@Column(name = "name", length = 100)
	public String getProName() {
		return this.proName;
	}

	public void setProName(String proName) {
		this.proName = proName;
	}

	@Column(name = "remark", length = 1000)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "sub_name", length = 50)
	public String getSubName() {
		return this.subName;
	}

	public void setSubName(String subName) {
		this.subName = subName;
	}

	@Column(name = "sub_time", length = 23)
	public Date getSubtime() {
		return subtime;
	}


	public void setSubtime(Date subtime) {
		this.subtime = subtime;
	}

	@Column(name = "sub_attach", length = 200)
	public String getSubAttach() {
		return subAttach;
	}


	public void setSubAttach(String subAttach) {
		this.subAttach = subAttach;
	}
	
	
	

}